package model;

import java.io.Serializable;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@NamedQueries( { @NamedQuery(name = "InformacionKm.findAll", query = "select o from InformacionKm o") })
@Table(name = "INFORMACION_KM")
public class InformacionKm implements Serializable {
    @Column(name = "DETALLE_INFO_KM", nullable = false, length = 350)
    private String detalleInfoKm;
    @Id
    @Column(name = "ID_INFO_KM", nullable = false, length = 20)
    private String idInfoKm;
    @Column(nullable = false)
    private BigDecimal kilometraje;
    @ManyToOne
    @JoinColumn(name = "ID_MODELO")
    private Modelo modelo;

    public InformacionKm() {
    }

    public InformacionKm(String detalleInfoKm, String idInfoKm, Modelo modelo, BigDecimal kilometraje) {
        this.detalleInfoKm = detalleInfoKm;
        this.idInfoKm = idInfoKm;
        this.modelo = modelo;
        this.kilometraje = kilometraje;
    }

    public String getDetalleInfoKm() {
        return detalleInfoKm;
    }

    public void setDetalleInfoKm(String detalleInfoKm) {
        this.detalleInfoKm = detalleInfoKm;
    }

    public String getIdInfoKm() {
        return idInfoKm;
    }

    public void setIdInfoKm(String idInfoKm) {
        this.idInfoKm = idInfoKm;
    }


    public BigDecimal getKilometraje() {
        return kilometraje;
    }

    public void setKilometraje(BigDecimal kilometraje) {
        this.kilometraje = kilometraje;
    }

    public Modelo getModelo() {
        return modelo;
    }

    public void setModelo(Modelo modelo) {
        this.modelo = modelo;
    }
}
